home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / AmigaTalk / Intuition / BitMap.st < prev    next >
Text File  |  2000-05-03  |  2KB  |  61 lines

  1. "---------------------------------------------------------------"
  2. " BitMap Class implements control of Amiga BitMaps.             "
  3. " ------------------------------------------------------------- "
  4. " Valid values for Flags are BMF_CLEAR = 1, BMF_DISPLAYABLE = 2," 
  5. " BMF_INTERLEAVED = 4, BMF_STANDARD = 8, BMF_MINPLANES = 16.    "
  6. "---------------------------------------------------------------"
  7.  
  8. Class BitMap :Glyph  ! width height depth flags name !
  9. [
  10.    remove
  11.       <primitive 189 0 name>
  12. |
  13.    getBitMapWidth
  14.       ^ width <- <primitive 189 2 0 name>
  15. |
  16.    getBitMapHeight
  17.       ^ height <- <primitive 189 2 1 name>
  18. |
  19.    getBitMapFlags
  20.       ^ flags <- <primitive 189 2 2 name>
  21. |
  22.    getBitMapDepth
  23.       ^ depth <- <primitive 189 2 3 name>
  24. |
  25.    setBitMapWidth: newWidth
  26.       <primitive 189 3 0 newWidth name>.
  27.       width <- newWidth
  28. |
  29.    setBitMapHeight: newHeight
  30.       <primitive 189 3 1 newHeight name>.
  31.       height <- newHeight
  32. |
  33.    setBitMapFlags: newFlags
  34.       <primitive 189 3 2 newFlags name>.
  35.       flags <- newFlags
  36. |
  37.    setBitMapDepth: newDepth
  38.       <primitive 189 3 3 newDepth name>.
  39.       depth <- newDepth
  40. |
  41.    readBitMapFile: bitMapFile
  42.       <primitive 189 4 bitMapFile name>.
  43.       width  <- <primitive 189 2 0 name>.
  44.       height <- <primitive 189 2 1 name>.
  45.       flags  <- <primitive 189 2 2 name>.
  46.       depth  <- <primitive 189 2 3 name>.
  47.  
  48.       ^ self "????"
  49. |
  50.    writeBitMapFile: bitMapFile
  51.       <primitive 189 5 bitMapFile name>
  52. |
  53.    new: newBitMapName
  54.       <primitive 189 1 1 1 1 newBitMapName>.
  55.       name   <- newBitMapName.
  56.       width  <- 1.
  57.       height <- 1.
  58.       depth  <- 1.
  59.       ^ self
  60. ]
  61.